<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>超市账单管理系统</title>
    <link rel="stylesheet" href="/statics/css/public.css"/>
    <link rel="stylesheet" href="/statics/css/style.css"/>
    <script type="text/javascript" src="/statics/js/jquery.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#updateButton").click(function () {
                //获取表单数据
                var data=$("form").serialize();
                //ajax
                $.post("/sys/provider/update",data,function (result) {
                    if(result=='success') {
                        alert("修改供应商信息成功");
                        location.href = "/sys/provider/toList";
                    }else{
                        alert("修改供应商信息失败，请稍后再试");
                    }
                });
            });
        })
    </script>
</head>
<body>
<section class="publicMian ">
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>账单管理页面 >> 供应商修改页面</span>
        </div>
        <div class="providerAdd">
            <form >
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="proCode">供应商编码：</label>
                    <input type="text" name="proCode" id="proCode" value="${provider.proCode}" readonly/>
                    <input type="hidden" name="id" value="${provider.id}">
                    <span>*</span>
                </div>
                <div>
                    <label for="proName">供应商名称：</label>
                    <input type="text" name="proName" id="proName" value="${provider.proName}"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="proContact">联系人：</label>
                    <input type="text" name="proContact" id="proContact" value="${provider.proContact}"/>
                    <span>*</span>

                </div>
                <div>
                    <label for="proPhone">联系电话：</label>
                    <input type="text" name="proPhone" id="proPhone" value="${provider.proPhone}"/>
                    <span></span>
                </div>
                <div>
                    <label for="proAddress">联系地址：</label>
                    <input type="text" name="proAddress" id="proAddress" value="${provider.proAddress}"/>
                    <span></span>

                </div>
                <div>
                    <label for="proFax">传真：</label>
                    <input type="text" name="proFax" id="proFax" value="${provider.proFax}"/>
                    <span></span>

                </div>
                <div>
                    <label for="proDesc">描述：</label>
                    <input type="text" name="proDesc" id="proDesc" value="${provider.proDesc}"/>
                    <span></span>

                </div>
                <div class="providerAddBtn">
                    <!--<a href="#">保存</a>-->
                    <!--<a href="providerList.html">返回</a>-->
                    <input type="button" value="修改" id="updateButton" />
                    <input type="button" value="返回" onclick="history.back(-1)"/>
                </div>
            </form>
        </div>

    </div>
</section>
</body>
</html>

